package org.bwf.study.controller;

import org.bwf.obj.bo.FilmQueryListBO;
import org.bwf.study.aop.ReturnInfo;
import org.bwf.study.servcie.FilmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/films/")
public class FilmController {

    @Autowired
    private FilmService filmService;

    @GetMapping
    public Object FilmQueryList(FilmQueryListBO bo){
        return new ReturnInfo(filmService.FilmQueryList(bo));
    }

    @GetMapping("{filmId}")
    public Object FilmQueryModel(@PathVariable Integer filmId){
        return new ReturnInfo(filmService.FilmQueryModel(filmId));
    }
}
